#include "Dice.h"


Dice::Dice()
{
	srand(time(NULL));
}


Dice::~Dice()
{
}


void Dice::throw_dice(){

	this->value = rand() % 6 + 1;
}

void Dice::print_dice(){

	if (this->value == 1){
		cout << " -------" << endl;
		cout << " |     |" << endl;
		cout << " |  x  |" << endl;
		cout << " |     |" << endl;
		cout << " -------" << endl;
	}
	if (this->value == 2){
		cout << " -------" << endl;
		cout << " | x   |" << endl;
		cout << " |     |" << endl;
		cout << " |   x |" << endl;
		cout << " -------" << endl;
	}
	if (this->value == 3){
		cout << " -------" << endl;
		cout << " | x   |" << endl;
		cout << " |  x  |" << endl;
		cout << " |   x |" << endl;
		cout << " -------" << endl;
	}
	if (this->value == 4){
		cout << " -------" << endl;
		cout << " | x x |" << endl;
		cout << " |     |" << endl;
		cout << " | x x |" << endl;
		cout << " -------" << endl;
	}
	if (this->value == 5){
		cout << " -------" << endl;
		cout << " | x x |" << endl;
		cout << " |  x  |" << endl;
		cout << " | x x |" << endl;
		cout << " -------" << endl;
	}
	if (this->value == 6){
		cout << " -------" << endl;
		cout << " | x x |" << endl;
		cout << " | x x |" << endl;
		cout << " | x x |" << endl;
		cout << " -------" << endl;
	}
}